
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>编辑洗车用户</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/public/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/public/layuiadmin/style/admin.css" media="all">
</head>
<body>
#{set saccUserDto:saccUser.get('list').get(0)/}
<div class="layui-fluid">
    <div class="layui-card">
        <div style="height: 42px;line-height: 42px;padding: 0 15px;border-bottom: 1px solid #f6f6f6;color: #333;border-radius: 2px 2px 0 0;font-size: 14px;">
            <span><i id="return" class="layui-icon layui-icon-return" style="padding-right: 10px;"></i></span>
            <span>修改管理员账号</span>
        </div>
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="" lay-filter="component-form-group">
                <input type="hidden" name="id" value="${saccUserDto.get('id').getAsString()}">
                <input type="hidden" name="bindThirdFlag" value="${saccUserDto.get('bindThirdFlag').getAsString()}">
                <input type="hidden" name="bindThirdDb" value="${saccUserDto.get('bindThirdDb').getAsString()}">
                <input type="hidden" name="washCount" value="${saccUserDto.get('washCount').getAsInt()}">
                <input type="hidden" name="amountRemain" value="${saccUserDto.get('amountRemain').getAsInt()}">
                <input type="hidden" name="amountConsume" value="${saccUserDto.get('amountConsume').getAsInt()}">
                <input type="hidden" name="lastStationId" value="${saccUserDto.get('lastStationId').getAsLong()}">
                <input type="hidden" name="lastWashTime" value="${saccUserDto.get('lastWashTime').getAsLong()}">
                <input type="hidden" name="regeditTime" value="${saccUserDto.get('regeditTime').getAsLong()}">

                <div class="layui-form-item">
                    <label class="layui-form-label">手机号</label>
                    <div class="layui-input-block">
                        <input type="text" name="mobile" value="" style="width: 300px"  autocomplete="off" placeholder="请输入手机号" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item layui-layout-admin">
                    <div class="layui-input-block">
                        <div class="layui-footer" style="left: 0;">
                            <button class="layui-btn" lay-submit="" lay-filter="component-form-demo1">提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="/public/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '/public/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form','layer'], function(){
        var $ = layui.$
                ,admin = layui.admin
                ,layer = layui.layer
                ,form = layui.form;

        $(document).on('click','#return',function(){
            window.location.href = "/user/saccUserList";
        });

        /* 监听提交 */
        form.on('submit(component-form-demo1)', function(data){
            var data=data.field;
            $.post("/user/saveSaccUser", data, function (result) {
                if (result.code > 0) {
                    layer.msg(result.msg, {icon:2});
                } else {
                    window.location.href = "/user/saccUserList";
                }
            });
            return false;
        });
    });
</script>
</body>
</html>
